package cn.gok.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName User
 * @Description TODO
 * @Author HP
 * @Date 11:48 2022/7/19
 * @Version 1.0
 **/
@Data
public class User {
    @TableId(type = IdType.AUTO)
//    @TableId(type = IdType.INPUT)//手动输入
    private Long id;
    private String name;
    private Integer age;
    private String email;
    //乐观锁
    @Version
    private Integer version;
    //逻辑删除的标识
    @TableLogic
    private Integer delted;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;//自动填充创建时间
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;//自动填充更新时间
}
